package com.ysw.spring.spring_util.redisson;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.client.RedisClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author: yu_sw
 * @Description: com.ysw.spring.spring_util.redisson
 * @date:2022/5/29 21:41
 */
@Configuration
public class RedissonClientConfig {
    @Bean
    public RedissonClient redisClient() {
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.37.11:6379");
        return Redisson.create(config);
    }


}
